package com.liuyu.common.framework.rocketmq.status.notify.service;

import com.liuyu.common.framework.queue.model.QueueMessageWrapper;

import java.util.Set;

/**
 * 事件消息处理状态接口
 * @author: liuyu
 * @date: 2022/6/27 12:06
 * @version: 1
 */
public interface EventMessageProcessStatus {
    /**
     * 当前策略处理的主题和标签
     * @author liuyu
     * @date 2022/4/11 15:07
     * @return java.lang.String
     */
    Set<String> getTopicTags();

    /**
     * 保存失败的消息
     * @author liuyu
     * @date 2021/8/17 10:45
     * @param queueMessageWrapper    包装类
     * @param exception 异常
     * @return boolean
     */
    <T, V> boolean saveFailMessage(QueueMessageWrapper<T> queueMessageWrapper, Exception exception);

    /**
     * 处理消息队列中的消息
     * @author liuyu
     * @date 2021/8/17 11:20
     * @param queueMessageWrapper
     * @return void
     */
    <T> void processQueueMessage(QueueMessageWrapper<T> queueMessageWrapper);
}
